package com.yiyi.credit.manage.abutment.common.enums;

public enum TdInterfacePathEnum {


    ANTIFRAUD("/antifraud","贷前反欺诈");

    private final String path;
    private final String msg;

    TdInterfacePathEnum(String path, String msg)
    {
        this.path = path;
        this.msg = msg;
    }

    public String getPath()
    {
        return path;
    }

    public String getMsg()
    {
        return msg;
    }
    public static boolean isInterfacePath(String code)
    {
        for (TdInterfacePathEnum s : TdInterfacePathEnum.values())
        {
            if (s.getPath().equals(code))
            {
                return true;
            }
        }
        return false;
    }
    /**
     * 根据编码获取信息
     * @param code
     * @return
     */
    public static String getMsgByCode(String code)
    {
        for (TdInterfacePathEnum v : TdInterfacePathEnum.values())
        {
            if (v.getPath().equals(code))
            {
                return v.getMsg();
            }
        }
        return "未知结果";
    }
}
